﻿Public Class Form1

    Private Sub cmdDL_Click(sender As Object, e As EventArgs) Handles cmdDL.Click
        If Textuse.Text = "admin" And Textpsd.Text = "password" Then
            MessageBox.Show("登录成功")
            Form3.ShowDialog()
        Else
            MessageBox.Show("用户名密码不正确！")
            Textpsd.Clear()
            Textuse.Focus()
        End If
    End Sub

    Private Sub Textpsd_KeyDown(sender As Object, e As KeyEventArgs) Handles Textpsd.KeyDown
        If e.KeyCode = Keys.Enter Then
            cmdDL_Click(sender, e)
        End If
    End Sub

    Private Sub LabelZC_Click(sender As Object, e As EventArgs) Handles LabelZC.Click
        Form2.ShowDialog()
    End Sub
End Class
